package com.explorx.sns.puma.im.core.chat;

import com.explorx.sns.puma.im.core.chat.model.ConversationModel;
import com.explorx.sns.puma.im.core.chat.model.CreateConvModel;
import com.explorx.sns.puma.im.core.chat.model.MessageModel;

import java.util.Date;
import java.util.List;

public interface ConversationService {

    List<ConversationModel> getUserConversation(Long userId, Date cidUpdateTime, int pageId, int pageSize);

    List<MessageModel> getConversationMessage(Long uid, Long cid);

    ConversationModel getUserConvByUserIdAndCid(Long userId,Long cid);

    ConversationModel getUserConvByPair(Long fromUserId,Long toUserId);

    boolean updateLastMsg(MessageModel messageModel);

    Long createConversation(CreateConvModel messageModel);

    boolean deleteConv(Long userId,Long cid);

    int topRank(Long userId, Long cid, boolean top);
}
